package com.liudadan.spring_ioc_07;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

public class UserService implements InitializingBean , DisposableBean {
   private Integer count;


    @Override
    public void destroy() throws Exception {
        count = 8;
        System.out.println("调用实例化方法");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        count=0;
        System.out.println("实例化方法销毁");
    }
}
